#ifndef GX_FR_PLUGIN_LIGHT_ENTITY_H
#define GX_FR_PLUGIN_LIGHT_ENTITY_H

#include "PointEntity.h"

namespace FinalRendering
{
	namespace Plugin
	{
		using namespace FinalRendering::Engine;

		class LightDesc : public IEntityDesc
		{
		public:
			static RefPtr<GxRendering::UI::Image> logoImage;
		public:
			virtual const wchar_t * ClassName();
			virtual IEntity * Create();
			virtual void Destroy(IEntity * ent);
			virtual IEntity * Create(Stream * stream);
			static IEntityDesc * GetDesc();
		};

		class Light : public PointEntity
		{
		public:
			vec3 Color;
			vec3 Dir;
			float DistanceHalf;
			float DistanceFull;
			float CutOff;
			float Power;
			Light();
			Light(Stream * stream);
		public:
			virtual bool Serialize(Stream * stream);
			virtual int ProcessMessage(IEntity * sender, EntityMessage msg);
			virtual IEntityDesc * GetDesc();
			virtual int GetPropertyCount();
			virtual PropertyDesc GetPropertyDesc(int i);
		public:
			static void InitPlugin(bool isEditor, IEngine * _engine, HMODULE module);
			static void DestroyPlugin();
			virtual void EditorDraw(IView * view);
		};
	}
}


#endif